package com.dyh.quickdemo.bizThreLoan;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/bizThreLoan")
public class BizThreadLoanController {

    @RequestMapping("/test")
    public Object test() throws InterruptedException {
        if (!BizThreadLoan.apply("hello"))
            return false;

        Thread.sleep(10000L);

        BizThreadLoan.repay("hello");


        return true;
    }


}
